PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Common Value Class Definitions

Table 3-1 summarizes common AppleScript value classes and provides links to sections that describe them in detail.

Table 3-1   Common AppleScript value class identifiers 

Value class identifier

Description of corresponding value

Boolean A logical truth value
Class A class identifier
Constant A reserved word defined by an application or AppleScript
Data Raw data that cannot be represented in AppleScript, but can be stored in a variable
Date A string that specifies a day of the week, day of the month, month, year, and time
File Specification A collection of data that specifies the name and location on disk of a file that may not yet exist
Integer A positive or negative number without a fractional part
International Text Character data in the form of international text; see Unicode Text and International Text
List An ordered collection of values
Number Synonym for either class Integer or class Real
Real A positive or negative number that can have a fractional part
Record A collection of properties
Reference A reference to an object
RGB Color A collection of three integer values that specify the red, green, and blue components of a color
String An ordered series of 1-byte characters
Styled Clipboard Text Special text data, retrieved from the Clipboard, that includes style and font information
Styled Text Synonym for a special string that includes style and font information
Text Synonym for class String
Unicode Text Character data in the form of Unicode (2-byte) text; see Unicode Text and International Text
Unit Type Value Classes Classes for working with measurements of length, area, cubic and liquid volume, mass, and temperature

Three identifiers in Table 3-1 act only as synonyms for other value classes: Number is a synonym for either Integer or Real, Text is a synonym for String, and Styled Text is a synonym for a string that contains style and font information. You can coerce values using these synonyms, but the class of the resulting value is always the true value class.

For example, you can use the class identifier Text to coerce a date to a string.

set x to date "May 14, 1993" as text
class of x
--result: string

Although definitions for value class synonyms are provided, they do not correspond to separate value classes. For more information about coercing values using synonyms, see Coercing Values.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)